package com.dlyk.mapper;

import com.dlyk.commons.DataScope;
import com.dlyk.model.Tran;
import com.dlyk.query.BaseQuery;
import com.dlyk.result.ChartData;

import java.math.BigDecimal;
import java.util.List;

public interface TranMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Tran record);

    int insertSelective(Tran record);

    Tran selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Tran record);

    int updateByPrimaryKey(Tran record);

    BigDecimal selectTranSuccessAmount();

    BigDecimal selectTranTotalAmount();

    int selectTranTotalCount();

    int selectTranSuccessCount();

    @DataScope(tableAlias = "c", tableField = "owner_id")
    List<Tran> selectTranListByPage(BaseQuery build);

    Tran selectTranDetailById(Integer id);

    List<ChartData> selectTranMoneyByMonth();
}

